class Animal {
    type;
    feature;
    name;
    constructor(type, feature) {
        this.type = type;
        this.feature = feature;
    }
    static isMammal = true;
}
class Dog extends Animal {
    constructor() {
        super('dog', 'four legs'); // 调用父类构造函数，要传相应的参数
    }
    bark() {
        console.log('wong wong');
    }
    getFeature() {
        console.log(this.feature);
    }
}
const dog = new Dog();
console.log(dog.type);
dog.getFeature(); // protected变量只能在子类中访问，子类的实例不能访问
console.log(Dog.isMammal);
dog.bark();
